import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

import '../home.dart';
import '../pages/list/index.dart';
import '../pages/tabs/index.dart';
import '../pages/expanded/index.dart';
import '../pages/flutter-md-1/index.dart';

final GoRouter router = GoRouter(
  routes: <RouteBase>[
    GoRoute(
      path: '/',
      builder: (BuildContext context, GoRouterState state) {
        return const AppHome();
      },
      routes: <RouteBase>[
        GoRoute(
          path: 'tabs',
          builder: (BuildContext context, GoRouterState state) {
            return const TabsPage();
          },
        ),
        GoRoute(
          path: 'list',
          builder: (BuildContext context, GoRouterState state) {
            return const ListPage();
          },
        ),
          GoRoute(
          path: 'expanded',
          builder: (BuildContext context, GoRouterState state) {
            return const ExpandedRowPage();
          },
        ),
         GoRoute(
          path: 'md-1-1',
          builder: (BuildContext context, GoRouterState state) {
            return const chapterOne1();
          },
        ),
          GoRoute(
          path: 'md-1-2',
          builder: (BuildContext context, GoRouterState state) {
            return const chapterOne2();
          },
        ),
      ],
    ),
  ],
);
